From: Jasper St. Pierre Date: Thu, 16 Feb 2012 22:23:16 +0000 (-0500) Subject: messageTray: Correctly show the icon on a notification stack X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7018 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=fd99d13f04b4618462a218d1476f820f182626e5;p=gnome-shell.git messageTray: Correctly show the icon on a notification stack An actor is removed from its parent after it emits the destroy signal, so we can't just check if the notification stack has more than one notification -- we need to check if there's a notification there that is not the current one. This was causing spew in the form of: "this.notificationStack.get_children()[0]._delegate.setIconVisible is not a function" --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 1c7f0bab4..9ccc6e4f7 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1327,8 +1327,9 @@ const SummaryItem = new Lang.Class({ } } - if (this.notificationStack.get_children().length > 0) - this.notificationStack.get_children()[0]._delegate.setIconVisible(true); + let firstNotification = this._stackedNotifications[0]; + if (firstNotification) + firstNotification.notification.setIconVisible(true); } }); Signals.addSignalMethods(SummaryItem.prototype);